<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>std.metastrings</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "std.metastrings";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/std.metastrings.html" class="symbol">std.metastrings</a></h1>
  
<div class="summary">Templates with which to do compile time manipulation of strings.</div>
<dl>
<dt class="decl">template <a class="symbol _template" name="Format" href="./htmlsrc/std.metastrings.html#L43" kind="template" beg="43" end="52">Format</a><span class="tparams">(A...)</span>; <a title="Permalink to this symbol" href="#Format" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L43">#</a></dt>
<dd class="ddef">
<div class="summary">Formats constants into a string at compile time.
 Analogous to std.string.format().</div>
<p class="sec_header">Parameters:</p>A =        tuple of constants, which can be strings,
                characters, or integral values.
<p class="sec_header">Formats:</p>The formats supported are %s for strings, and %%
        for the % character.
<p class="sec_header">Example:</p><pre class="d_code">
<span class="k">import</span> <span class="i">std</span>.<span class="i">metastrings</span>;
<span class="k">import</span> <span class="i">std</span>.<span class="i">stdio</span>;

<span class="k">void</span> <span class="i">main</span>()
{
  <span class="i">string</span> <span class="i">s</span> = <span class="i">Format</span>!(<span class="sl">"Arg %s = %s"</span>, <span class="sl">"foo"</span>, <span class="n">27</span>);
  <span class="i">writefln</span>(<span class="i">s</span>); <span class="lc">// "Arg foo = 27"</span>
}
</pre>
<dl>
<dt class="decl">char[] <a class="symbol _variable" name="Format.Format" href="./htmlsrc/std.metastrings.html#L46" kind="variable" beg="46" end="46">Format</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#Format.Format" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L46">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">template <a class="symbol _template" name="FormatString" href="./htmlsrc/std.metastrings.html#L54" kind="template" beg="54" end="68">FormatString</a><span class="tparams">(const(char)[] F, A...)</span>; <a title="Permalink to this symbol" href="#FormatString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L54">#</a></dt>
<dd class="ddef">
<dl>
<dt class="decl">char[] <a class="symbol _variable" name="FormatString.FormatString" href="./htmlsrc/std.metastrings.html#L57" kind="variable" beg="57" end="57">FormatString</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#FormatString.FormatString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L57">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">template <a class="symbol _template" name="ToString" href="./htmlsrc/std.metastrings.html#L74" kind="template" beg="74" end="80">ToString</a><span class="tparams">(ulong U)</span>; <a title="Permalink to this symbol" href="#ToString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L74">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:2" href="./htmlsrc/std.metastrings.html#L85" kind="template" beg="85" end="91">ToString</a><span class="tparams">(long I)</span>; <a title="Permalink to this symbol" href="#ToString:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L85">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:3" href="./htmlsrc/std.metastrings.html#L96" kind="template" beg="96" end="99">ToString</a><span class="tparams">(uint U)</span>; <a title="Permalink to this symbol" href="#ToString:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L96">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:4" href="./htmlsrc/std.metastrings.html#L102" kind="template" beg="102" end="105">ToString</a><span class="tparams">(int I)</span>; <a title="Permalink to this symbol" href="#ToString:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L102">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:5" href="./htmlsrc/std.metastrings.html#L108" kind="template" beg="108" end="111">ToString</a><span class="tparams">(ushort U)</span>; <a title="Permalink to this symbol" href="#ToString:5" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L108">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:6" href="./htmlsrc/std.metastrings.html#L114" kind="template" beg="114" end="117">ToString</a><span class="tparams">(short I)</span>; <a title="Permalink to this symbol" href="#ToString:6" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L114">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:7" href="./htmlsrc/std.metastrings.html#L120" kind="template" beg="120" end="123">ToString</a><span class="tparams">(ubyte U)</span>; <a title="Permalink to this symbol" href="#ToString:7" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L120">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:8" href="./htmlsrc/std.metastrings.html#L126" kind="template" beg="126" end="129">ToString</a><span class="tparams">(byte I)</span>; <a title="Permalink to this symbol" href="#ToString:8" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L126">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:9" href="./htmlsrc/std.metastrings.html#L132" kind="template" beg="132" end="135">ToString</a><span class="tparams">(bool B)</span>; <a title="Permalink to this symbol" href="#ToString:9" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L132">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:10" href="./htmlsrc/std.metastrings.html#L138" kind="template" beg="138" end="141">ToString</a><span class="tparams">(string S)</span>; <a title="Permalink to this symbol" href="#ToString:10" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L138">#</a></dt>
<dt class="decl">template <a class="symbol _template" name="ToString:11" href="./htmlsrc/std.metastrings.html#L144" kind="template" beg="144" end="147">ToString</a><span class="tparams">(char C)</span>; <a title="Permalink to this symbol" href="#ToString:11" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L144">#</a></dt>
<dd class="ddef">
<div class="summary">Convert constant argument to a string.</div>
<dl>
<dt class="decl">char[] <a class="symbol _variable" name="ToString.ToString" href="./htmlsrc/std.metastrings.html#L77" kind="variable" beg="77" end="77">ToString</a>; <span class="attrs">[<span class="stc">invariant</span>]</span> <a title="Permalink to this symbol" href="#ToString.ToString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L77">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest" href="./htmlsrc/std.metastrings.html#L149" kind="unittest" beg="149" end="153">unittest</a>; <a title="Permalink to this symbol" href="#unittest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L149">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">template <a class="symbol _template" name="ParseUinteger" href="./htmlsrc/std.metastrings.html#L166" kind="template" beg="166" end="180">ParseUinteger</a><span class="tparams">(const(char)[] s)</span>; <a title="Permalink to this symbol" href="#ParseUinteger" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L166">#</a></dt>
<dd class="ddef">
<div class="summary">Parse unsigned integer literal from the start of string s.</div>
<p class="sec_header">Returns:</p>.value = the integer literal as a string,
        .rest = the string following the integer literal
<p class="sec_header">Otherwise:</p>.value = null,
        .rest = s
<dl>
<dt class="decl">char[] <a class="symbol _variable" name="ParseUinteger.value" href="./htmlsrc/std.metastrings.html#L169" kind="variable" beg="169" end="169">value</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#ParseUinteger.value" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L169">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">char[] <a class="symbol _variable" name="ParseUinteger.rest" href="./htmlsrc/std.metastrings.html#L170" kind="variable" beg="170" end="170">rest</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#ParseUinteger.rest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L170">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">template <a class="symbol _template" name="ParseInteger" href="./htmlsrc/std.metastrings.html#L193" kind="template" beg="193" end="212">ParseInteger</a><span class="tparams">(const(char)[] s)</span>; <a title="Permalink to this symbol" href="#ParseInteger" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L193">#</a></dt>
<dd class="ddef">
<div class="summary">Parse integer literal optionally preceded by '-'
 from the start of string s.</div>
<p class="sec_header">Returns:</p>.value = the integer literal as a string,
        .rest = the string following the integer literal
<p class="sec_header">Otherwise:</p>.value = null,
        .rest = s
<dl>
<dt class="decl">char[] <a class="symbol _variable" name="ParseInteger.value" href="./htmlsrc/std.metastrings.html#L196" kind="variable" beg="196" end="196">value</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#ParseInteger.value" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L196">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">char[] <a class="symbol _variable" name="ParseInteger.rest" href="./htmlsrc/std.metastrings.html#L197" kind="variable" beg="197" end="197">rest</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#ParseInteger.rest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L197">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:2" href="./htmlsrc/std.metastrings.html#L214" kind="unittest" beg="214" end="220">unittest</a>; <a title="Permalink to this symbol" href="#unittest:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.metastrings.html#L214">#</a></dt>
<dd class="ddef"></dd></dl>
</div>
<div id="footer">
  <p>Public Domain</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Sun Dec 28 04:26:41 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>